#!/bin/bash

filename=$1
target=$(echo ${filename%.*})
cat <<EOF >Makefile
all: ${target}

${target}:${filename}
	gcc $^ -o ${target}

clean:
	rm -f ${target}

EOF
